﻿<UserControl x:Class="Samba.Modules.InventoryModule.InventoryItemView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Common="clr-namespace:Samba.Presentation.Common;assembly=Samba.Presentation.Common"
     mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <StackPanel>
            <Label>
                <LocText ResourceIdentifierKey="InventoryItemName" Suffix=":"/>
            </Label>
            <TextBox HorizontalAlignment="Left" MinWidth="200" Text="{Binding Name,Mode=TwoWay}" />
            <Label>
                <LocText ResourceIdentifierKey="GroupCode" Suffix=":"/>
            </Label>
            <ComboBox HorizontalAlignment="Left" MinWidth="150" Text="{Binding GroupCode,Mode=TwoWay}"
                 ItemsSource="{Binding GroupCodes}" IsEditable="True">
            </ComboBox>
            <Label>
                <LocText ResourceIdentifierKey="BaseUnit" Suffix=":"/>
            </Label>
            <TextBox HorizontalAlignment="Left" MinWidth="100" Text="{Binding BaseUnit,Mode=TwoWay}" />
            <StackPanel Orientation="Horizontal">
                <StackPanel>
                    <Label>
                        <LocText ResourceIdentifierKey="TransactionUnit" Suffix=":"/>
                    </Label>
                    <TextBox HorizontalAlignment="Left" MinWidth="100" Text="{Binding TransactionUnit,Mode=TwoWay}" />
                </StackPanel>
                <StackPanel Margin="10,0">
                    <Label>
                        <LocText ResourceIdentifierKey="TransacitonUnitMultiplier" Suffix=":"/>
                    </Label>
                    <Common:FilteredTextBox HorizontalAlignment="Left" Type="Number" MinWidth="50" Text="{Binding TransactionUnitMultiplier,Mode=TwoWay}" />
                </StackPanel>
            </StackPanel>
            <Button HorizontalAlignment="Left" Margin="0,10" MinWidth="70" Content="{Binding SaveCommand.Caption}"
                 Command="{Binding SaveCommand}" />
            <Label Content="{Binding Error}" Foreground="Red" />
        </StackPanel>
    </Grid>
</UserControl>